#include "KRuntime.h"
#include "KTrace.h"

namespace krt
{
	void __cdecl DbgOutput(LPCSTR Fmt, ...)
	{
#ifndef __linux

		va_list va;
		va_start(va, Fmt);

		char buf[512];	
		int n = vsprintf_s(buf, sizeof(buf), Fmt, va);

		va_end(va);

		::OutputDebugStringA(buf);

#endif
	}

	void AssertFailed(LPTSTR pFileName, int nLineNum)
	{
#ifndef __linux
		char buf[512];
		sprintf_s(buf, sizeof(buf), "assertion failed in %s, line %i", pFileName, nLineNum);
		::OutputDebugStringA(buf);
#endif
	}
}